package com.hopes.bizz.close.gis.controller;

import com.hopes.bizz.close.gis.service.ClosedAreaService;
import com.hopes.boss.common.core.util.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yumr
 * @ProjectName bizz
 * @Description 分区管控
 * @time 2023/10/31 19:38
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/area")
@Tag(description = "area", name = "封闭化管理一张图（分区管控）")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class ClosedAreaController {


    private final ClosedAreaService areaService;

    /**
     * 控制区数量
     */
    @Operation(summary = "控制区数量", description = "控制区数量")
    @GetMapping("/level")
    public R queryLevelNum() {
        return R.ok(areaService.queryLevelNum());
    }

    @Operation(summary = "控制区信息", description = "控制区信息")
    @GetMapping("/info")
    public R queryControlArea() {
        return R.ok(areaService.queryControlArea());
    }


}
